<template>
  <div>
    <Postitem
      v-for="postdata in postdatalist"
      :postdata="postdata"
      :key="postdata.id"
    />
  </div>
</template>

<script>
import Postitem from "../components/Postitem";
export default {
  components: {
    Postitem,
  },
  data(){
     return{
         postdatalist:[]
     }
  },
  created() {
    this.$axios({
      url: "/post",
    }).then((res) => {
      console.log(res.data.data);
      console.log(res.data.data[0].cover[0].url);
      this.postdatalist = res.data.data;
    });
  },
};
</script>

<style>
</style>